package com.sc.nft.entity.vo;

import cn.hutool.core.util.DesensitizedUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class GetCertificationTypeVO {

    @ApiModelProperty("0:未申请 1成功 2进行中 3失败")
    private Integer isPass;

    @ApiModelProperty("用户账号")
    private String userAccount;

    @ApiModelProperty("用户手机号")
    private String userTel;

    @ApiModelProperty("实名认证是否关闭")
    private Boolean faceIsClose;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("身份证")
    private String cardId;

    @ApiModelProperty("昵称")
    //勿删,安卓会出问题
    private String nickName;

    @ApiModelProperty("头像")
    //勿删,安卓会出问题
    private String headUrl;

    @ApiModelProperty("人脸验证接口")
    private String faceCheckUrl;

    @ApiModelProperty("人脸检测是否失败")
    private Boolean faceFail = Boolean.FALSE;

    public void setName(String name) {
        if (StrUtil.isNotBlank(name)){
            this.name = StrUtil.hide(name,0,name.length()-1);
        }
        else {
            this.name = StrUtil.EMPTY;
        }

    }

    public void setCardId(String cardId) {
        this.cardId = DesensitizedUtil.idCardNum(cardId, 1 , 1);
    }
}
